package com.wangyk.thymeleafproject.console.service;

import com.wangyk.rabbitmqcommon.model.console.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 调用其它服务的接口，name为其它服务的名称
 * Feign本质还是Http，内部使用了Ribbon作为负载均衡
 */
/**
 * Feign结合Hystrix使用
 * */
@FeignClient(name = "console", path = "/console/userpro",fallback = UserServiceHystrix.class)
public interface UserService
{
    @RequestMapping("/test_ribbon.do")
    public User getUserByUserId();
}
